/**
 * 	 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 *   @author Colin Redmond
 *   Copyright (C) 2011 Colin Redmond
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 */

package com.cred.industries.platform.dao;

import java.sql.Connection;

import com.cred.industries.platform.business.objects.ForgotPasswordBO;

public interface IForgotPasswordDAO {

	/**
	 * Inserts the new forgotPassBO into the Db
	 * @param forgotPassBO the forgotPass BO to insert
	 */
	void insert(ForgotPasswordBO forgotPassBO);

	/**
	 * Inserts the new forgotPassBO into the Db
	 * @param connect the DB connection used to insert, assumed to be a session. Caller must manager
	 * @param forgotPassBO the forgotPass BO to insert
	 */
	void insert(Connection connect, ForgotPasswordBO forgotPassBO);
	
	/**
	 * update the forgotPass BO in the DB, this will only update the isValid field
	 * @param forgotPassBO the forgotPass BO to be updated
	 */
	void update(ForgotPasswordBO forgotPassBO);
	
	/**
	 * update the forgotPass BO in the DB, this will only update the isValid field
	 * @param connect the DB connection used to insert, assumed to be a session. Caller must manager
	  * @param forgotPassBO the forgotPass BO to be updated
	 */
	void update(Connection connect, ForgotPasswordBO forgotPassBO);
	
	/**
	 * returns a forgotPass BO for a user by forgotPassBO
	 * @param forgotPassBO the unique ID of forgot password
	 * @return the found session BO for the session ID
	 */
	ForgotPasswordBO findById(String forgotPassID);

	/**
	 * deletes a forgotPassBO from the DB
	 * @param sessionBO the session BO to delete 
	 * @return
	 */
	boolean delete(ForgotPasswordBO forgotPassBO);
}
